﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {

            // Dongwu();
            //Jisuan();
            Tuxing();


        }
        static void Dongwu()
        {
            Laohu lh = new Laohu();
            lh.Leg = 4;
            lh.Shuijiao();
            lh.Zoulu();
            lh.Jioa();
            lh.Catfan();
            lh.Yeshinengli();
            Anmal a = new Laohu();
            a.Jiao();
            Console.WriteLine(" -----------------------------");

            Cat cat = new Cat();
            cat.Leg = 4;
            cat.Shuijiao();
            cat.Zoulu();
            cat.Jioa();
            cat.Catfan();
            cat.Yeshinengli();
            Anmal b = new Cat();
            b.Jiao();
            Console.WriteLine(" -----------------------------");
            Yanzhi yz = new Yanzhi();
            yz.Leg = 2;
            yz.Shuijiao();
            yz.Zoulu();
            yz.Jioa();
            yz.Catfan();
            yz.Fei();
            Anmal c = new Yanzhi();
            c.Jiao();
            Console.WriteLine(" -----------------------------");
            Ying y = new Ying();
            y.Leg = 2;
            y.Shuijiao();
            y.Zoulu();
            y.Jioa();
            y.Catfan();
            y.Fei();
            Anmal d = new Ying();
            d.Jiao();
            Console.WriteLine(" -----------------------------");



            Console.WriteLine("欢迎来到xx宠物店，请问你要寄存什么动物呢：1、猫；2、燕子；3、老鹰；4、老虎");
            int key = int.Parse(Console.ReadLine());
            Anmal A;
            switch (key)
            {
                case 1:
                    A = new Cat();
                    break;
                case 2:
                    A = new Yanzhi();
                    break;
                case 3:
                    A = new Ying();
                    break;
                case 4:
                    A = new Laohu();
                    break;
                default:
                    Console.WriteLine("输入错误");
                    A = new Laohu();
                    break;
            }
            Chongwuyuan cg = new Chongwuyuan();
            cg.Chongwu(A);
        }
        static void Jisuan() 
        {
            Console.WriteLine("请输入a的值");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("请输入b的值");
            int b = int.Parse(Console.ReadLine());

            Console.WriteLine("请选择+ - * /");
            string s = Console.ReadLine();
            Calculate c;
            switch (s)
            {
                case "+":
                    Jia  j = new Jia();
                    j.a = a;
                    j.b = b;
                    j.DisplayResult();
                    break;
                case "-":
                    Jian i= new Jian();
                    i.a = a;
                    i.b = b;
                    i.DisplayResult();
                    break;
                case "*":
                    Cheng h= new Cheng();
                    h.a = a;
                    h.b = b;
                    h.DisplayResult();

                    break;
                case "/":
                    Chu u = new Chu();
                    u.a = a;
                    u.b = b;
                    u.DisplayResult();
                    break;
                default:
                    Console.WriteLine("输入错误");
                    c = new Cheng();
                    break;
            }

        }
        static void Tuxing() 
        {

            Console.WriteLine("请输入1：圆形，2：长方形");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("输入图形颜色");
            string c2 = Console.ReadLine();
            Square s1 = new Square();
            s1.color = c2;
            Circle c1 = new Circle();
            c1.color = c2;
            switch (a)
            {
                case 1:
                    Circle c = new Circle();
                    Console.WriteLine("请输入圆的半径");
                    double radius = double.Parse(Console.ReadLine());
                    c.radius = radius;
                    c.GetArea();
                    break;
                case 2:
                    Square s = new Square();
                    Console.WriteLine("请输入边长");
                    int sideLen = int.Parse(Console.ReadLine());
                    s.sideLen = sideLen;
                    s.GetArea();
                    break;
                default:
                    Console.WriteLine( "输入错误");
                    break;


            }
            
            

        }

    }
}
